{if isset($list) && !isset($parent)}

	{foreach from=$list item=entry}
		<div class="wallMessage">
			{if !is_null($entry->getIdUser())}
			<div class="userAvatar"><a href="{url label=userProfile idUser=$entry->getIdUser()}" title="{$entry->user->getFirstAndLastName()}"><img src="{$urlStatic}/{image src=$entry->user->getAvatar() w=50 h=50}" alt="{$entry->user->getFirstAndLastName()}" title="{$entry->user->getFirstAndLastName()}" class="avatar"/></a></div>
			{else}
			<div class="userAvatar"><img src="{$urlStatic}/{image src='' w=50 h=50}" alt="{'Tennizoom'|t}" title="{'Tennizoom'|t}" class="avatar"/></div>
			{/if}
			<div class="message">
				{if !is_null($entry->getIdUser())}
				<p class="date">{$entry->getDate()}</p>
				<p class="username"><a href="{url label=userProfile idUser=$entry->getIduser()}" title="{$entry->user->getFirstAndLastName()}">{$entry->user->getFirstAndLastName()}</a>{if $entry->user->isExpert()} <a href="#" class="expertRank"><img src="{$urlStatic}/image/Strona/rankExpert.png" alt="{'Expert user'|t}" title="{'Expert user'|t}" /></a>{/if}{foreach from=$entry->user->getBadges() item=badge} <a href="#" class="badge"><img src="{$urlStatic}/{image h=15 src=$badge.image}" alt="{$badge.name|t}" title="{$badge.name|t}"></a>{/foreach}</p>
				{else}
				<p class="date">{$entry->getDate()}</p>
				<p class="username"><a>{'Tennizoom'|t}</a></p>
				{/if}
				{$entry->getDescription(1)}

				<div class="commentBar">
					<a  onclick="load_comments('{url label="wallPostWall"}','#subComments{$entry->getId()}','replace')" class="aComments" title="comments" id="countComments{$entry->getId()}">{$entry->getCommentCount()} {'comments'|t}</a>
					<a class="addComment" title="comments">write your comment</a>
				</div>

				<div id="subComments{$entry->getId()}"></div>

				<div class="comments commentsNewMessage">
					<div class="userAvatar"><a href="{url label=userProfile idUser=$_user->getId()}" title="Username"><img src="{$urlStatic}/{image src=$_user->getAvatar() w=30 h=30}"  alt="Username" title="Username" class="avatar"/></a></div>
					<div class="message">
						<textarea id="comment{$entry->getId()}" rows="5" cols="20" onfocus="if($(this).val() == '{'Enter your message'|t}')$(this).val('');" onblur="if($(this).val() == '')$(this).val('{'Enter your message'|t}');">{'Enter your message'|t}</textarea>
						<br /><input class="button" id="postbutton" type="button" value="{'send'|t}" onclick="post_to_wall('{url label="wallPostWall"}','{'Enter your message'|t}','#comment{$entry->getId()}','#subComments{$entry->getId()}','replace')" />
					</div>
					<div class="clearBoth"></div>
				</div>
			</div>
			<div class="clearBoth"></div>
		</div>

	{/foreach}

	{if !$preload}<a class="more" href="#" onclick="refresh_obj = $(this); refresh_wall('{url label=wallLoadWall}'); return false;">{'more'|t}</a>{/if}
{else}
	<div id="subComments{$parent}">
	{foreach from=$list item=entry}
		<div class="comments" style="display: block">
			<div class="userAvatar"><a href="{url label=userProfile idUser=$entry->getIdUser()}" title="{$entry->user->getFirstAndLastName()}"><img src="{$urlStatic}/{image src=$entry->user->getAvatar() w=30 h=30}"  alt="{$entry->user->getFirstAndLastName()}" title="{$entry->user->getFirstAndLastName()}" class="avatar"/></a></div>
			<div class="message">
				<p class="date">{$entry->getDate()}</p>
				<p class="username"><a href="{url label=userProfile idUser=$entry->getIdUser()}" title="{$entry->user->getFirstAndLastName()}">{$entry->user->getFirstAndLastName()}</a></p>
				{$entry->getDescription(1)}
			</div>
			<div class="clearBoth"></div>
		</div>
	{/foreach}
	</div>
	<script type="text/javascript">
		$('#countComments{$parent}').text('{$list|@count} comments');
		</script>
{/if}
	{*<div class="wallMessage">
							<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
							<div class="message">
								<p class="date">2011-01-01</p>
								<p class="username"><a href="#" title="Username">Username Familyname</a> <img src="{$urlStatic}/image/Strona/rankExpert.png" alt="rank"/></p>
								<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.
								A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.
								</p>

								<div class="commentBar">
									<a class="aComments" title="comments">5 comments</a>
									<a class="addComment" title="comments">write your comment</a>
								</div>



								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>

								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a> <img src="images/rank5.png" alt="rank"/></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>

								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>

								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>


								<div class="comments commentsNewMessage">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar2.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<textarea name="comment" rows="5" cols="20">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </textarea>
									</div>
									<div class="clearBoth"></div>
								</div>




							</div>
							<div class="clearBoth"></div>
						</div>


						<br/>

						<div class="wallMessage">
							<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar2.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
							<div class="message">
								<p class="date">2011-01-01</p>
								<p class="username"><a href="#" title="Username">Username Familyname</a></p>
								<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.
								A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>

								<div class="commentBar">
									<a class="aComments" title="comments">2 comments</a>
									<a class="addComment" title="comments">write your comment</a>
								</div>

								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>

								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>


								<div class="comments commentsNewMessage">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar2.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<textarea name="comment" rows="5" cols="20">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </textarea>
									</div>
									<div class="clearBoth"></div>
								</div>
							</div>

							<div class="clearBoth"></div>
						</div>




						<br/>

						<div class="wallMessage">
							<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg" alt="Username" title="Username" class="avatar"/></a></div>
							<div class="message">
								<p class="date">2011-01-01</p>
								<p class="username"><a href="#" title="Username">Username Familyname</a></p>
								<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.
								A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>

								<div class="commentBar">
									<a class="aComments" title="comments">0 comments</a>
									<a class="addComment" title="comments">write your comment</a>
								</div>

								<div class="comments commentsNewMessage">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar2.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<textarea name="comment" rows="5" cols="20">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </textarea>
									</div>
									<div class="clearBoth"></div>
								</div>
							</div>
							<div class="clearBoth"></div>
						</div>


						<br/>

						<div class="wallMessage">
							<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar2.jpg" alt="Username" title="Username" class="avatar"/></a></div>
							<div class="message">
								<p class="date">2012-01-01</p>
								<p class="username"><a href="#" title="Username">Username Familyname</a></p>
								<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.
								A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>

								<div class="commentBar">
									<a class="aComments" title="comments">2 comments</a>
									<a class="addComment" title="comments">write your comment</a>
								</div>
								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>

								<div class="comments">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar1.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<p class="date">2011-01-01</p>
										<p class="username"><a href="#" title="Username">Username Familyname</a></p>
										<p>A French play on words accompanying a photo of Maria Sharapova in the official tournament publication at the French Open might make English speakers do a double-take. Monday's edition of "Quotidien" carries a front-page headline in all capital letters with Sharapova's name.</p>
									</div>
									<div class="clearBoth"></div>
								</div>


								<div class="comments commentsNewMessage">
									<div class="userAvatar"><a href="#" title="Username"><img src="{$urlStatic}/image/Strona/temp/avatar2.jpg"  alt="Username" title="Username" class="avatar"/></a></div>
									<div class="message">
										<textarea name="comment" rows="5" cols="20">Lorem Ipsum is simply dummy text of the printing and typesetting industry. </textarea>
									</div>
									<div class="clearBoth"></div>
								</div>
							</div>
							<div class="clearBoth"></div>
						</div>

						<br />*}

						
